<title>个人中心</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="viewport" content="width=device-width,height=device-height,inital-scale=1.0,maximum-scale=1.0,user-scalable=no;">
<meta name="apple-mobile-web-app-capable" content="yes">
<meta name="apple-mobile-web-app-status-bar-style" content="black">
<meta name="format-detection" content="telephone=no">
<script type="text/javascript" src="#(assets)/js/jquery-2.2.4.min.js"></script>
<script type="text/javascript" src="#(assets)/js/layer/layer.js"></script>
#@checkToken()
<style> 
	body{font-family:"Microsoft YaHei",Arial,Helvetica,sans-serif,"宋体";}
	li{list-style-type:none;}
</style>

<body bgcolor="#f4f5f9" style="margin:0px;">
	<img id="personal_center" style="position:absolute;top:20px;left:20px;height:22px;" src="#(assets)/images/mobile/personal_img5.png">
	<img id="personal_message" style="position:absolute;top:20px;right:20px;height:22px;" src="#(assets)/images/mobile/personal_img6.png">
	<div align="center" style="width:100%;height:200px;background:url(#(assets)/images/mobile/personal_back.jpg) no-repeat;background-size:100% 100%;">
		<div id="mobile" style="font-size:14px;color:#FFF;height:30px;line-height:60px;"></div>
		<div style="font-size:14px;color:#FFF;height:50px;line-height:50px;">资产总额（元）</div>
		<div id="all_assets" style="font-size:32px;color:#FFF;margin-top:-15px;height:60px;"></div>
		<div align="center" style="font-size:14px;color:#FFF;margin-top:-15px;">
			<div align="center" style="float:left;width:49%;margin-top:10px;border-right:1px solid #fff">
				<div>昨日收益( 元 )</div>
				<div id="yesterday_benefit" style="font-size:18px;"></div>
			</div>
			<div align="center" style="float:left;width:49%;margin-top:10px;">
				<div>累计收益( 元 )</div>
				<div id="already_interest" style="font-size:18px;"></div>
			</div>
		</div>
	</div>
	<div align="center" style="height:100px;background:#FFF;width:100%;">
		<div id="personal_balance" style="width:90%;border-bottom:1px solid #f5f6f8;height:40px;">
			<div style="float:left;line-height:40px;">账户余额( 元 )</div> 
			<div style="float:right;line-height:40px;color:#fa3048">
				<a id="availableAmount" style="margin-right:10px;"></a>
				<img style="height:12px;marign-top:15px;" src="#(assets)/images/mobile/personal_jiantou.png">
			</div>
		</div>
		<div align="center" style="height:55px;width:90%;">
			<div id="personal_extract" align="center" style="float:left;width:43%;height:35px;border:1px solid #fa3048;margin-top:10px;border-radius:17.5px;color:#fa3048;line-height:35px;">提现</div>
			<div id="personal_deposit" align="center" style="background:#fa3048;float:right;width:43%;height:35px;border:2px solid #fa3048;margin-top:10px;border-radius:17.5px;color:#FFF;line-height:35px;">充值</div>
		</div>
	</div>
	<div style="padding-bottom:60px;">
		<div id="personal_project" align="center" style="margin-top:10px;background:#FFF;height:50px;width:100%;border-bottom:1px solid #f4f5f9">
			<div style="width:90%;border-bottom:1px solid #f4f5f9;height:50px;">
				<div style="float:left;height:50px;line-height:50px;"><img style="width:24px;vertical-align:middle;" src="#(assets)/images/mobile/personal_img1.png"><a style="color:#383838;margin-left:10px;line-height:50px;">已投项目</a></div>
				<div style="float:right;height:50px;line-height:50px;"><img style="margin-top:17px;width:16px;" src="#(assets)/images/mobile/personal_jiantou2.png"></div>
			</div>
		</div>
		<div id="personal_transaction" align="center" style="background:#FFF;height:50px;width:100%;border-bottom:1px solid #f4f5f9">
			<div style="width:90%;border-bottom:1px solid #f4f5f9;height:50px;">
				<div style="float:left;height:50px;line-height:50px;"><img style="width:24px;vertical-align:middle;" src="#(assets)/images/mobile/personal_img2.png"><a style="color:#383838;margin-left:10px;line-height:50px;">交易明细</a></div>
				<div style="float:right;height:50px;line-height:50px;"><img style="margin-top:17px;width:16px;" src="#(assets)/images/mobile/personal_jiantou2.png"></div>
			</div>
		</div>
		<div id="personal_reward" align="center" style="background:#FFF;height:50px;width:100%;border-bottom:1px solid #f4f5f9">
			<div style="width:90%;border-bottom:1px solid #f4f5f9;height:50px;">
				<div style="float:left;height:50px;line-height:50px;"><img style="width:24px;vertical-align:middle;" src="#(assets)/images/mobile/personal_img3.png"><a style="color:#383838;margin-left:10px;line-height:50px;">我的奖励</a></div>
				<div style="float:right;height:50px;line-height:50px;"><img style="margin-top:17px;width:16px;" src="#(assets)/images/mobile/personal_jiantou2.png"></div>
			</div>
		</div>
		<div id="personal_friend" align="center" style="background:#FFF;height:50px;width:100%;">
			<div style="width:90%;border-bottom:1px solid #f4f5f9;height:50px;">
				<div style="float:left;height:50px;line-height:50px;"><img style="width:24px;vertical-align:middle;" src="#(assets)/images/mobile/personal_img4.png"><a style="color:#383838;margin-left:10px;line-height:50px;">查看好友</a></div>
				<div style="float:right;height:50px;line-height:50px;"><img style="margin-top:17px;width:16px;" src="#(assets)/images/mobile/personal_jiantou2.png"></div>
			</div>
		</div>
	</div>
	<!--菜单--> 
	<div align="center" style="clear:both;position:fixed;bottom:0px;height:57px;width:100%;border-top:1px solid #d2d2d2;background:#FFF">
		<div style="color:#8a8a8a;float:left;width:33.3%;height:50px;padding-bottom:5px" onclick="window.location.href='/app/page/index-index'">
			<img style="height:25px;margin-top:5px;" src="#(assets)/images/mobile/menu_11.png">
			<div style="font-size:12px;margin-top:5px;">推荐</div>
		</div>
		<div style="color:#8a8a8a;float:left;width:33.3%;height:50px;padding-bottom:5px" onclick="window.location.href='/app/page/invest-investList'">
			<img style="height:25px;margin-top:5px;" src="#(assets)/images/mobile/menu_21.png">
			<div style="font-size:12px;margin-top:5px;">投资</div>
		</div>
		<div style="color:#fa3048;float:left;width:33.3%;height:50px;border-bottom:2px solid #fa3048;padding-bottom:5px" onclick="window.location.href='/app/page/personal-personal'">
			<img style="height:25px;margin-top:5px;" src="#(assets)/images/mobile/menu_32.png">
			<div style="font-size:12px;margin-top:5px;">我的</div>
		</div>
		
	</div>
	
<script>
	var url ="#(path)/user/benefit?token=#(session.token??)";
	$.getJSON(url, function(datainfo) {
		console.log(datainfo);
		console.log(1);
		var userinfo = datainfo.data.info;
		var userinfo2 = datainfo.data;
		$("#all_assets").html(userinfo2.all_assets); 
		$("#mobile").html(userinfo.mobile.substring(0, 3) + "****" + userinfo.mobile.substring(7, 11));
		console.log(userinfo2);
		$("#yesterday_benefit").html(userinfo2.yesterday_benefit);
		$("#already_interest").html(userinfo2.already_interest);
		$("#availableAmount").html(userinfo2.availableAmount);
	});
	var url2 = "#(path)/notice/unReadMark?token=#(session.token??)";
	$.getJSON(url2, function(datainfo2){
		console.log(datainfo2);
		var srcinfo1 = "#(assets)/images/mobile/personal_img6.png";
		var srcinfo2 = "#(assets)/images/mobile/personal_img7.png";
		if(datainfo2.data.total==0){
			$("#personal_message").attr('src',srcinfo1); 
		}else{
			$("#personal_message").attr('src',srcinfo2); 
		}
	});
	var url ="#(path)/user/info?token=#(session.token??)";
	$.getJSON(url, function(datainfo1) {
		console.log(datainfo1);
		$("#personal_extract").click(function(){
			if(datainfo1.data.info.is_real_name_verify ==0){
				layer.msg("您还未实名认证！",{icon:2,time:1000},function(){
					window.location.href="/app/page/user-auth";
				});
			}else if(datainfo1.data.info.is_bind_bank_card ==0){
				layer.msg("您还未绑定银行卡！",{icon:2,time:1000},function(){
					window.location.href="/app/page/personal-bidbank";
				});
			}else{
				window.location.href="/app/page/personal-extract";
			}
		});
		$("#personal_deposit").click(function(){
			if(datainfo1.data.info.is_real_name_verify ==0){
				layer.msg("您还未实名认证！",{icon:2,time:1000},function(){
					window.location.href="/app/page/user-auth";
				});
			}else if(datainfo1.data.info.is_bind_bank_card ==0){
				layer.msg("您还未绑定银行卡！",{icon:2,time:1000},function(){
					window.location.href="/app/page/personal-bidbank";
				});
			}else{
				window.location.href="/app/page/personal-deposit";
			}
		});
		$("#personal_balance").click(function(){
			if(datainfo1.data.info.is_real_name_verify ==0){
				layer.msg("您还未实名认证！",{icon:2,time:1000},function(){
					window.location.href="/app/page/user-auth";
				});
			}else if(datainfo1.data.info.is_bind_bank_card ==0){
				layer.msg("您还未绑定银行卡！",{icon:2,time:1000},function(){
					window.location.href="/app/page/personal-bidbank";
				});
			}else{
				window.location.href="/app/page/personal-balance";
			}
		});
	});
	$("#personal_center").click(function(){
		window.location.href="/app/page/personal-center";
	});
	$("#personal_message").click(function(){
		window.location.href="/app/page/personal-message";
	});
	$("#personal_project").click(function(){
		window.location.href="/app/page/personal-project";
	});
	$("#personal_transaction").click(function(){
		window.location.href="/app/page/personal-transaction";
	});
	$("#personal_reward").click(function(){
		window.location.href="/app/page/personal-nouse";
	});
	$("#personal_friend").click(function(){
		window.location.href="/app/page/personal-friend";
	});
</script>
	
	
	
	
</body>